package com.educate.dao;

import com.educate.pojo.ProblemLike;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ProblemLikeDao接口
 * @author HUAWEI
 */
@Mapper
public interface ProblemLikeDao {

    /**
     *添加用户点赞
     * @param problemLike
     * @return
     */
    int addProblemLike(ProblemLike problemLike);

    /**
     * 删除用户点赞
     * @param problemId
     * @param username
     * @return
     */
    int deleteProblemLike(@Param("problemId") long problemId, @Param("username") long username);


    /**
     * 查询用户是否点赞
     * @param problemId
     * @param username
     * @return
     */
    int queryProblemLike(@Param("problemId") long problemId, @Param("username") long username);

    /**
     * 批量取消用户点赞
     * @param userProblemLike
     * @param username
     * @return
     */
    int deleteProblemLikeBash(@Param("userProblemLike") List<Integer> userProblemLike, @Param("username") long username);

    /**
     * 批量添加用户点赞
     *
     * @param userProblemLike
     * @return
     */
    int addProblemLikeBash(@Param("userProblemLike") List<ProblemLike> userProblemLike, @Param("username") long username);



}













